<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org"
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="comm/common :: common_resource"/>

<body class="layui-layout-body">
  <div id="LAY_app" >
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item layadmin-flexible" lay-unselect>
            <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
              <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
            </a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;" layadmin-event="refresh" title="刷新">
              <i class="layui-icon layui-icon-refresh-3"></i>
            </a>
          </li>
        </ul>
        <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="fullscreen" title="全屏显示">
              <i class="layui-icon layui-icon-screen-full"></i>
            </a>
          </li>

          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a lay-href="goUpdatePwd" title="修改密码">
              <i class="layui-icon layui-icon-edit"></i>
            </a>
          </li>

          <li class="layui-nav-item" lay-unselect>
            <a href="javascript:;">
              <img class="layui-nav-img" th:src="${userFace}" onerror="javascript:this.src='public/image/personnel.png'" />
              <cite><shiro:principal property="uname"/></cite>
            </a>
          </li>

          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="javascript:;" layadmin-event="logout">
              <i class="layui-icon layui-icon-pause">退出</i>
            </a>
          </li>
        </ul>
      </div>

      <!-- 侧边菜单 -->
      <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
          <div class="layui-logo" >
            <span>
                后台权限管理系统
            </span>
          </div>
          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
            <li data-name="home" class="layui-nav-item layui-nav-itemed">
              <a lay-href="census/goIndex" lay-tips="主页" lay-direction="2">
                <i class="layui-icon layui-icon-home"></i>
                <cite>固定主页</cite>
              </a>
            </li>
            <!-- 组件 start -->
            <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="官网示例" lay-direction="2">
                <i class="layui-icon layui-icon-component"></i>
                <cite>官网示例</cite>
                <span class="layui-nav-more"></span>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="button">
                  <a href="https://my.oschina.net/u/3204029" target="_blank" lay-tips="作者博客博文">博客博文</a>
                </dd>
                <dd data-name="button">
                  <a href="https://www.oschina.net/p/springboot-auth-up" target="_blank" lay-tips="springboot-auth-up项目Gitee源码地址">项目源码</a>
                </dd>
                <dd data-name="button">
                  <a href="https://www.layui.com/demo/" target="_blank" lay-tips="前端Layui在线示例">Layui Demo</a>
                </dd>
                <dd data-name="button">
                  <a href="https://www.layui.com/doc/" target="_blank" lay-tips="前端Layui在线文档">Layui Doc</a>
                </dd>
                <dd data-name="button">
                  <a href="https://spring.io/projects/spring-boot/" target="_blank" lay-tips="Spring Boot官网">Spring Boot</a>
                </dd>
                <dd data-name="button">
                  <a href="https://shiro.apache.org/" target="_blank" lay-tips="Apache Shiro权限框架">Apache Shiro</a>
                </dd>
                <dd data-name="button">
                  <a href="http://h_gxi.gitee.io/hg-layui-admin-ui/" target="_blank" lay-tips="基于layui组件封装的一套后台管理ui框架">Hg Layui</a>
                </dd>
                <dd data-name="button">
                  <a href="https://gitee.com/h_gxi/hg-layui-admin-ui" target="_blank" lay-tips="前端Hg-Layui框架Gitee源码">Hg Layui Gitee</a>
                </dd>
              </dl>
            </li>
            <!-- 组件 end -->

            <!-- 中间件 -->
            <li data-name="component" class="layui-nav-item">
              <a href="javascript:;" lay-tips="中间件" lay-direction="2">
                <i class="layui-icon layui-icon-link"></i>
                <cite>中间件</cite>
                <span class="layui-nav-more"></span>
              </a>
              <dl class="layui-nav-child">
                <dd data-name="button">
                  <a lay-href="public/layui/menu/button.html"  lay-tips="项目菜单样式图标对应值">样式图标</a>
                </dd>
                <dd data-name="button">
                  <a lay-href="http://112.74.169.11/expdoc/" lay-tips="MYSQL数据库导出表说明Word文档">导出数据库文档</a>
                </dd>
              </dl>
            </li>

             <li th:each="menu:${menuList}" data-name="template" class="layui-nav-item">
               <shiro:hasPermission name="${menu.id}">
                 <a href="javascript:;" lay-direction="2">
                    <i class="layui-icon" th:classappend="'layui-icon-'+${menu.img}"></i>
                    <cite th:text="${menu.name}">菜单</cite>
                  </a>
                   <dl th:each="child:${menu.childList}" class="layui-nav-child">
                     <shiro:hasPermission name="${child.id}">
                           <dd data-name="console">
                               <a  th:attr="lay-href=${child.url}"  th:text="${child.name}">菜单</a>
                           </dd>
                     </shiro:hasPermission>
                    </dl>
               </shiro:hasPermission>
              </li>

          </ul>
        </div>
      </div>

      <!-- 页面标签 -->
      <div class="layadmin-pagetabs" id="LAY_app_tabs">
        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
        <div class="layui-icon layadmin-tabs-control layui-icon-down">
          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
            <li class="layui-nav-item" lay-unselect>
              <a href="javascript:;"></a>
              <dl class="layui-nav-child layui-anim-fadein">
                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
              </dl>
            </li>
          </ul>
        </div>
        <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
          <ul class="layui-tab-title" id="LAY_app_tabsheader">
            <li lay-id="views/home/console.html" lay-attr="home/console.html" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
          </ul>
        </div>
      </div>

      <!-- 主体内容 -->
      <div class="layui-body" id="LAY_app_body">
        <div class="layadmin-tabsbody-item layui-show">
        <hr/>

           <iframe src="census/goIndex" frameborder="0" class="layadmin-iframe"></iframe>

         </div>
       </div>
       <!-- 辅助元素，一般用于移动设备下遮罩 -->
      <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
  </div>
  <script>
    layui.config({
      base: 'layuiadmin/' //静态资源所在路径
    }).extend({
      index: 'lib/index' //主入口模块
    }).use('index');
  </script>
</body>
</html>
